#ifndef HELPER_H
#define HELPER_H

#include "php_pushgateway.h"

#include <string>
#include <vector>
#include <math.h>
#include <curl/curl.h>

using namespace std;

vector<string> split(string str, string pattern);
string doubleToString(double value, int precisionAfterPoint);
void print_zval_type(zval *value);

zval *read_obj_property(zval *obj, const char *property, string obj_class);
zval *read_property(zval *obj, const char *property);
zval *array_str_search(zval *arr, const char *key);
zval *array_index_search(zval *arr, int key);
string str_replace_all(string source, string old_str, string new_str);

#endif